﻿using System.Collections.Generic;

namespace K9Nano.Settings;

public interface ISettingDefinitionManager
{
    /// <summary>
    /// Create default settings
    /// </summary>
    /// <param name="settings"></param>
    void Create(IEnumerable<SettingDefinition> settings);

    /// <exception cref="KeyNotFoundException"></exception>
    /// <summary>
    ///  Gets the <see cref="SettingDefinition"/> object with given unique name.
    /// </summary>
    /// <param name="name"></param>
    /// <returns></returns>
    SettingDefinition GetSettingDefinition(string name);

    bool TryGetSettingDefinition(string name, out SettingDefinition? definition);

    /// <summary>
    /// Gets a list of all setting definitions.
    /// </summary>
    /// <returns>All settings.</returns>
    IReadOnlyList<SettingDefinition> GetAllSettingDefinitions();
}